package org.dromara.vehicle.modules.driver.domain.bo;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.vehicle.modules.driver.domain.DriverViolationRecord;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 驾驶员违章记录业务对象 driver_violation_record
 *
 * @author ckk
 * @date 2025-06-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DriverViolationRecord.class, reverseConvertGenerate = false)
public class DriverViolationRecordBo extends BaseEntity {

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 关联驾驶员基本信息表ID
     */
    private Long driverId;

    /**
     * 关联车辆基本信息表ID
     */
    @NotNull(message = "关联车辆基本信息表ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long vehicleId;

    /**
     * 车牌号
     */
    @NotBlank(message = "车牌号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String licensePlate;

    /**
     * 违章日期
     */
    @NotNull(message = "违章日期不能为空", groups = { AddGroup.class, EditGroup.class })
    @JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN)
    private Date violationDate;

    /**
     * 违章地点
     */
    @NotBlank(message = "违章地点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String location;

    /**
     * 违章行为
     */
    @NotBlank(message = "违章行为不能为空", groups = { AddGroup.class, EditGroup.class })
    private String violationAct;

    /**
     * 扣分
     */
    @NotNull(message = "扣分不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer demeritPoints;

    /**
     * 罚款(元)
     */
    @NotNull(message = "罚款(元)不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal fineAmount;


}
